<?php namespace Summer\Shop\Updates;

use Schema;
use Winter\Storm\Database\Updates\Migration;

class BuilderTableUpdateSummerShopProducts extends Migration
{
    public function up()
    {
        Schema::table('summer_shop_products', function($table)
        {
            $table->text('params')->nullable();
            $table->string('service_ids')->nullable();
            $table->integer('sales')->nullable()->default(0);
            $table->integer('show_sales')->nullable()->default(0);
        });
    }
    
    public function down()
    {
        Schema::table('summer_shop_products', function($table)
        {
            $table->dropColumn('params');
            $table->dropColumn('service_ids');
            $table->dropColumn('sales');
            $table->dropColumn('show_sales');
        });
    }
}
